package com.woniu.controller.app;

import com.woniu.entity.Result;
import com.woniu.pojo.Subject;
import com.woniu.service.ISubjectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/app/subject")
public class AppSubjectController {

    @Autowired
    private ISubjectService subjectService;


    @GetMapping("/index/two")
    public Result<List<Subject>> listIndexTwo() {
        List<Subject> subjectList = subjectService.listIndexTwo();
        return Result.ok(subjectList);
    }
}